package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "business", schema = "boot", catalog = "")
//出差表
public class Business {
    private int bId;//出差id
    private Kehu kId;//客户id
    private User empId;//员工id
    private String businessTheme;//出差主题
    private Timestamp businessStart;//出差开始时间
    private Timestamp businessOver;//出差结束时间
    private String businessChufadi;//出发地
    private String businessPlace;//目的地
    private String businessTxry;//同行人员
    private String businessJtgj;//交通工具
    private BigDecimal businessJk;//借款
    private String businessBzhu;//备注
    private String businessState;//状态
    private String businessSqr;//出差申请人
    private String businessShenhe;//审核状态

    private Integer businessZtai;//删除状态

    @Id
    @Column(name = "b_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "seq")
    public int getbId() {
        return bId;
    }

    public void setbId(int bId) {
        this.bId = bId;
    }

    //多个出差对应一个客户
    @ManyToOne
    @JoinColumn(name = "k_id", nullable = true)
    public Kehu getkId() {
        return kId;
    }

    public void setkId(Kehu kId) {
        this.kId = kId;
    }

    //多个出差对应一个用户
    @ManyToOne
    @JoinColumn(name = "emp_id", nullable = true)
    public User getEmpId() {
        return empId;
    }

    public void setEmpId(User empId) {
        this.empId = empId;
    }
    @Basic
    @Column(name = "Business_theme", nullable = true, length = 1024)
    public String getBusinessTheme() {
        return businessTheme;
    }

    public void setBusinessTheme(String businessTheme) {
        this.businessTheme = businessTheme;
    }

    @Basic
    @Column(name = "Business_start", nullable = false)
    public Timestamp getBusinessStart() {
        return businessStart;
    }

    public void setBusinessStart(Timestamp businessStart) {
        this.businessStart = businessStart;
    }

    @Basic
    @Column(name = "Business_over", nullable = false)
    public Timestamp getBusinessOver() {
        return businessOver;
    }

    public void setBusinessOver(Timestamp businessOver) {
        this.businessOver = businessOver;
    }

    @Basic
    @Column(name = "Business_place", nullable = true, length = 1024)
    public String getBusinessPlace() {
        return businessPlace;
    }

    public void setBusinessPlace(String businessPlace) {
        this.businessPlace = businessPlace;
    }

    @Basic
    @Column(name = "Business_state", nullable = true, length = 1024)
    public String getBusinessState() {
        return businessState;
    }

    public void setBusinessState(String businessState) {
        this.businessState = businessState;
    }


    @Basic
    @Column(name = "Business_sqr", nullable = true, length = 1024)
    public String getBusinessSqr() {
        return businessSqr;
    }

    public void setBusinessSqr(String businessSqr) {
        this.businessSqr = businessSqr;
    }


    @Basic
    @Column(name = "Business_shenhe", nullable = true, length = 255)
    public String getBusinessShenhe() {
        return businessShenhe;
    }

    public void setBusinessShenhe(String businessShenhe) {
        this.businessShenhe = businessShenhe;
    }

    @Basic
    @Column(name = "Business_chufadi", nullable = true, length = 255)
    public String getBusinessChufadi() {
        return businessChufadi;
    }

    public void setBusinessChufadi(String businessChufadi) {
        this.businessChufadi = businessChufadi;
    }

    @Basic
    @Column(name = "Business_txry", nullable = true, length = 255)
    public String getBusinessTxry() {
        return businessTxry;
    }

    public void setBusinessTxry(String businessTxry) {
        this.businessTxry = businessTxry;
    }

    @Basic
    @Column(name = "Business_jtgj", nullable = true, length = 255)
    public String getBusinessJtgj() {
        return businessJtgj;
    }

    public void setBusinessJtgj(String businessJtgj) {
        this.businessJtgj = businessJtgj;
    }

    @Basic
    @Column(name = "Business_jk", nullable = true, precision = 2)
    public BigDecimal getBusinessJk() {
        return businessJk;
    }

    public void setBusinessJk(BigDecimal businessJk) {
        this.businessJk = businessJk;
    }

    @Basic
    @Column(name = "Business_bzhu", nullable = true, length = 255)
    public String getBusinessBzhu() {
        return businessBzhu;
    }

    public void setBusinessBzhu(String businessBzhu) {
        this.businessBzhu = businessBzhu;
    }

    @Basic
    @Column(name = "Business_ztai", nullable = true)
    public Integer getBusinessZtai() {
        return businessZtai;
    }

    public void setBusinessZtai(Integer businessZtai) {
        this.businessZtai = businessZtai;
    }
}
